package butines.core.game.steering;

import butines.core.game.Vehicle;
import butines.core.math.Vector2f;

public class SeekBehavior extends AbstractBehavior {

	private Vehicle seeker;
	private Vector2f target = new Vector2f();
	private Vector2f steeringForce;

	public Vehicle getSeeker() {
		return seeker;
	}

	public void setSeeker(Vehicle seeker) {
		this.seeker = seeker;
	}

	public Vector2f getTarget() {
		return target;
	}

	public void on(Vector2f target) {
		on();
		this.target.set(target);
	}

	@Override
	public Vector2f calculate() {
		return steeringForce = seek(seeker, target);
	}

	public Vector2f getSteeringForce() {
		return steeringForce;
	}

}
